<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p6_cube</title>

    <style>
        body{
            height: 100vh;
            background-image: radial-gradient(#000,lightyellow,#000);
        }

        .boxs>div{
            width: 200px;
            height: 200px;
            font-size: 80px;
            text-align: center;
            line-height: 200px;
            position: absolute;
            border: 1px solid gold;
            color: gold;
            border-radius: 30px;
            background-color: rgba(255,255,255,.6);
            box-shadow: 0 0 60px 0 gold;
        }
        .show{
            perspective: 800px;
            transition: 10s;

        }
        .boxs{
            transform-style: preserve-3d;
            width: 200px;
            height: 200px;
            margin: 200px auto;
            animation: turn 10s linear infinite;

        }
        .boxs:hover{
            animation-play-state: paused;
        }
        .boxs>.p1{
            transform: translateZ(100px);
        }
        .boxs>.p2{
            transform: translateZ(-100px) scaleX(-1);
        }
        .boxs>.p3{
            transform: rotateY(90deg) translateZ(100px);
        }
        .boxs>.p4{
            transform: rotateY(90deg) translateZ(-100px) scaleX(-1);
        }
        .boxs>.p5{
            transform: rotateX(90deg) translateZ(100px);
        }
        .boxs>.p6{
            transform: rotateX(90deg) translateZ(-100px) scaleX(-1);
        }
        @keyframes turn {
            100%{
                transform: scale(0.2)  rotate3d(1,0,1,360deg) ;
            }
        }

    </style>

</head>
<body>

<div class="show">
    <div class="boxs">
        <div class="p1">1</div>
        <div class="p2">2</div>
        <div class="p3">3</div>
        <div class="p4">4</div>
        <div class="p5">5</div>
        <div class="p6">6</div>
    </div>
</div>

</body>
</html>